package com.sx.gongzhong.adapter;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.baidu.mapapi.search.sug.SuggestionResult;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sx.gongzhong.R;

import java.util.List;

/**地址选择
 * Created by admin on 2018/1/3.
 */

public class LocationSelectAdapter extends BaseQuickAdapter<SuggestionResult.SuggestionInfo,BaseViewHolder> {

    private Context context;


    public LocationSelectAdapter(Context context, @LayoutRes int layoutResId,
                                 @Nullable List<SuggestionResult.SuggestionInfo> data) {
        super(layoutResId, data);
        this.context=context;
    }

    @Override
    protected void convert(BaseViewHolder helper,  SuggestionResult.SuggestionInfo item) {
        helper.setText(R.id.tvName,item.key);
        helper.setText(R.id.tvAddress,item.city+item.district);
    }


}
